FILE_LOCATION   =	"/ifs/scratch/c2b2/ip_lab/ddd2124"

setwd(FILE_LOCATION)


PC_FILE<-read.table("parchild.lst",header=F,stringsAsFactors=F)
GC_FILE<-read.table("gparchild.lst",header=F,stringsAsFactors=F)
SIB_FILE<-read.table("siblings.lst",header=F,stringsAsFactors=F)
HSIB_FILE<-read.table("halfsiblings.lst",header=F,stringsAsFactors=F)

poplist<-read.table("PopIndex.txt",header=F, stringsAsFactors=F)
poplist<-poplist[,1]


tot <- length(poplist)

tot <- tot*tot/2 - tot


PCprior <- length(PC_FILE[,1]) / tot

GCprior <- length(GC_FILE[,1]) / tot

SIBprior <- length(SIB_FILE[,1]) / tot

HSIBprior <- length(HSIB_FILE[,1]) / tot

BGprior <- 1 - PCprior - GCprior - SIBprior - HSIBprior


priortable<-data.frame(PC=PCprior, GC=GCprior, SIB=SIBprior,
		 HSIB=HSIBprior, BG=BGprior) 

write.table(priortable, "Priors.txt", quote=F, row.names=F)